// Borland C++ Builder
// Copyright (c) 1995, 1999 by Borland International
// All rights reserved

// (DO NOT EDIT: machine generated header) 'Richedit2.pas' rev: 5.00

#ifndef Richedit2HPP
#define Richedit2HPP

#pragma delphiheader begin
#pragma option push -w-
#pragma option push -Vx
#include <Menus.hpp>	// Pascal unit
#include <ComCtrls.hpp>	// Pascal unit
#include <RichEdit.hpp>	// Pascal unit
#include <StdCtrls.hpp>	// Pascal unit
#include <Graphics.hpp>	// Pascal unit
#include <Forms.hpp>	// Pascal unit
#include <Controls.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <SysUtils.hpp>	// Pascal unit
#include <Windows.hpp>	// Pascal unit
#include <Messages.hpp>	// Pascal unit
#include <SysInit.hpp>	// Pascal unit
#include <System.hpp>	// Pascal unit

//-- user supplied -----------------------------------------------------------
#define CHARFORMAT2A ::CHARFORMAT2A

namespace Richedit2
{
//-- type declarations -------------------------------------------------------
#pragma option push -b-
enum TTabAlignment { tabLeftAlignment, tabCenterAlignment, tabRightAlignment, tabDecimal };
#pragma option pop

#pragma option push -b-
enum TNsTypePuce { tpNone, tpBullet, tpChiffreArabe, tpMinuscule, tpMajuscule, tpRomainMin, tpRomainMaj 
	};
#pragma option pop

#pragma option push -b-
enum TNsCadrePuce { cpParentheseD, cpParenthesesGD, cpPoint, cpRien };
#pragma option pop

#pragma pack(push, 1)
struct TNumberingStyle2
{
	TNsTypePuce TypePuce;
	TNsCadrePuce CadrePuce;
} ;
#pragma pack(pop)

class DELPHICLASS TTextAttributes;
class DELPHICLASS TCustomRichEdit2;
class DELPHICLASS TParaAttributes;
class PASCALIMPLEMENTATION TParaAttributes : public Classes::TPersistent 
{
	typedef Classes::TPersistent inherited;
	
private:
	TCustomRichEdit2* RichEdit;
	void __fastcall GetAttributes(PARAFORMAT2 &Paragraph);
	Classes::TAlignment __fastcall GetAlignment(void);
	int __fastcall GetFirstIndent(void);
	int __fastcall GetLeftIndent(void);
	int __fastcall GetRightIndent(void);
	int __fastcall GetTab(Byte Index);
	TTabAlignment __fastcall GetTabAlignment(Byte Index);
	int __fastcall GetTabCount(void);
	void __fastcall InitPara(PARAFORMAT2 &Paragraph);
	void __fastcall SetAlignment(Classes::TAlignment Value);
	void __fastcall SetAttributes(PARAFORMAT2 &Paragraph);
	void __fastcall SetFirstIndent(int Value);
	void __fastcall SetLeftIndent(int Value);
	void __fastcall SetRightIndent(int Value);
	void __fastcall SetTab(Byte Index, int Value);
	void __fastcall SetTabAlignment(Byte Index, TTabAlignment Value);
	void __fastcall SetTabCount(int Value);
	
public:
	__fastcall TParaAttributes(TCustomRichEdit2* AOwner);
	virtual void __fastcall Assign(Classes::TPersistent* Source);
	__property Classes::TAlignment Alignment = {read=GetAlignment, write=SetAlignment, nodefault};
	__property int FirstIndent = {read=GetFirstIndent, write=SetFirstIndent, nodefault};
	__property int LeftIndent = {read=GetLeftIndent, write=SetLeftIndent, nodefault};
	TNumberingStyle2 __fastcall GetNumbering(void);
	void __fastcall SetNumbering(TNumberingStyle2 Value);
	__property int RightIndent = {read=GetRightIndent, write=SetRightIndent, nodefault};
	__property int Tab[Byte Index] = {read=GetTab, write=SetTab};
	__property TTabAlignment TabAlignment[Byte Index] = {read=GetTabAlignment, write=SetTabAlignment};
	__property int TabCount = {read=GetTabCount, write=SetTabCount, nodefault};
public:
	#pragma option push -w-inl
	/* TPersistent.Destroy */ inline __fastcall virtual ~TParaAttributes(void) { }
	#pragma option pop
	
};


class PASCALIMPLEMENTATION TCustomRichEdit2 : public Stdctrls::TCustomMemo 
{
	typedef Stdctrls::TCustomMemo inherited;
	
private:
	bool FHideScrollBars;
	TTextAttributes* FSelAttributes;
	TTextAttributes* FDefAttributes;
	TParaAttributes* FParagraph;
	Classes::TAlignment FOldParaAlignment;
	int FScreenLogPixels;
	Classes::TStrings* FRichEditStrings;
	Classes::TMemoryStream* FMemStream;
	Classes::TNotifyEvent FOnSelChange;
	bool FHideSelection;
	bool FModified;
	TMetaClass*FDefaultConverter;
	Comctrls::TRichEditResizeEvent FOnResizeRequest;
	Comctrls::TRichEditProtectChange FOnProtectChange;
	Comctrls::TRichEditSaveClipboard FOnSaveClipboard;
	Windows::TRect FPageRect;
	HIDESBASE MESSAGE void __fastcall CMBiDiModeChanged(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall CMColorChanged(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall CMFontChanged(Messages::TMessage &Message);
	MESSAGE void __fastcall CNNotify(Messages::TWMNotify &Message);
	bool __fastcall GetPlainText(void);
	bool __fastcall ProtectChange(int StartPos, int EndPos);
	bool __fastcall SaveClipboard(int NumObj, int NumChars);
	void __fastcall SetHideScrollBars(bool Value);
	HIDESBASE void __fastcall SetHideSelection(bool Value);
	void __fastcall SetPlainText(bool Value);
	void __fastcall SetRichEditStrings(Classes::TStrings* Value);
	void __fastcall SetDefAttributes(TTextAttributes* Value);
	void __fastcall SetSelAttributes(TTextAttributes* Value);
	HIDESBASE MESSAGE void __fastcall WMNCDestroy(Messages::TWMNoParams &Message);
	HIDESBASE MESSAGE void __fastcall WMSetCursor(Messages::TWMSetCursor &Message);
	HIDESBASE MESSAGE void __fastcall WMPaint(Messages::TWMPaint &Message);
	HIDESBASE MESSAGE void __fastcall WMSetFont(Messages::TWMSetFont &Message);
	HIDESBASE MESSAGE void __fastcall WMRButtonUp(Messages::TWMMouse &Message);
	HIDESBASE AnsiString __fastcall GetText();
	HIDESBASE void __fastcall SetText(AnsiString Value);
	
protected:
	virtual void __fastcall CreateParams(Controls::TCreateParams &Params);
	virtual void __fastcall CreateWnd(void);
	virtual void __fastcall DestroyWnd(void);
	virtual void __fastcall RequestSize(const Windows::TRect &Rect);
	DYNAMIC void __fastcall SelectionChange(void);
	virtual void __fastcall DoSetMaxLength(int Value);
	virtual Windows::TPoint __fastcall GetCaretPos();
	virtual int __fastcall GetSelLength(void);
	virtual int __fastcall GetSelStart(void);
	virtual AnsiString __fastcall GetSelText();
	HIDESBASE void __fastcall SetSelText(const AnsiString Value);
	virtual void __fastcall SetSelLength(int Value);
	virtual void __fastcall SetSelStart(int Value);
	__property bool HideSelection = {read=FHideSelection, write=SetHideSelection, default=1};
	__property bool HideScrollBars = {read=FHideScrollBars, write=SetHideScrollBars, default=1};
	__property Classes::TStrings* Lines = {read=FRichEditStrings, write=SetRichEditStrings};
	__property Comctrls::TRichEditSaveClipboard OnSaveClipboard = {read=FOnSaveClipboard, write=FOnSaveClipboard
		};
	__property Classes::TNotifyEvent OnSelectionChange = {read=FOnSelChange, write=FOnSelChange};
	__property Comctrls::TRichEditProtectChange OnProtectChange = {read=FOnProtectChange, write=FOnProtectChange
		};
	__property Comctrls::TRichEditResizeEvent OnResizeRequest = {read=FOnResizeRequest, write=FOnResizeRequest
		};
	__property bool PlainText = {read=GetPlainText, write=SetPlainText, default=0};
	
public:
	__fastcall virtual TCustomRichEdit2(Classes::TComponent* AOwner);
	__fastcall virtual ~TCustomRichEdit2(void);
	virtual void __fastcall Clear(void);
	int __fastcall FindTextA(const AnsiString SearchStr, int StartPos, int LengthText, Comctrls::TSearchTypes 
		Options);
	virtual int __fastcall GetSelTextBuf(char * Buffer, int BufSize);
	virtual void __fastcall Print(const AnsiString Caption);
	/*         class method */ static void __fastcall RegisterConversionFormat(TMetaClass* vmt, const AnsiString 
		AExtension, TMetaClass* AConversionClass);
	__property TMetaClass* DefaultConverter = {read=FDefaultConverter, write=FDefaultConverter};
	__property TTextAttributes* DefAttributes = {read=FDefAttributes, write=SetDefAttributes};
	__property TTextAttributes* SelAttributes = {read=FSelAttributes, write=SetSelAttributes};
	__property Windows::TRect PageRect = {read=FPageRect, write=FPageRect};
	__property TParaAttributes* Paragraph = {read=FParagraph};
	__property AnsiString SelText = {read=GetSelText, write=SetSelText};
	__property AnsiString Text = {read=GetText, write=SetText, stored=false};
public:
	#pragma option push -w-inl
	/* TWinControl.CreateParented */ inline __fastcall TCustomRichEdit2(HWND ParentWindow) : Stdctrls::TCustomMemo(
		ParentWindow) { }
	#pragma option pop
	
};


class PASCALIMPLEMENTATION TTextAttributes : public Classes::TPersistent 
{
	typedef Classes::TPersistent inherited;
	
private:
	TCustomRichEdit2* RichEdit;
	Comctrls::TAttributeType FType;
	void __fastcall GetAttributes(CHARFORMAT2A &Format);
	Graphics::TFontCharset __fastcall GetCharset(void);
	Graphics::TColor __fastcall GetColor(void);
	Comctrls::TConsistentAttributes __fastcall GetConsistentAttributes(void);
	int __fastcall GetHeight(void);
	AnsiString __fastcall GetName();
	Graphics::TFontPitch __fastcall GetPitch(void);
	bool __fastcall GetProtected(void);
	int __fastcall GetSize(void);
	Graphics::TFontStyles __fastcall GetStyle(void);
	void __fastcall SetAttributes(CHARFORMAT2A &Format);
	void __fastcall SetCharset(Graphics::TFontCharset Value);
	void __fastcall SetColor(Graphics::TColor Value);
	void __fastcall SetHeight(int Value);
	void __fastcall SetName(AnsiString Value);
	void __fastcall SetPitch(Graphics::TFontPitch Value);
	void __fastcall SetProtected(bool Value);
	void __fastcall SetSize(int Value);
	void __fastcall SetStyle(Graphics::TFontStyles Value);
	
protected:
	void __fastcall InitFormat(CHARFORMAT2A &Format);
	virtual void __fastcall AssignTo(Classes::TPersistent* Dest);
	
public:
	__fastcall TTextAttributes(TCustomRichEdit2* AOwner, Comctrls::TAttributeType AttributeType);
	virtual void __fastcall Assign(Classes::TPersistent* Source);
	void __fastcall AddStyle(Graphics::TFontStyle Style);
	void __fastcall RemoveStyle(Graphics::TFontStyle Style);
	__property Graphics::TFontCharset Charset = {read=GetCharset, write=SetCharset, nodefault};
	__property Graphics::TColor Color = {read=GetColor, write=SetColor, nodefault};
	__property Comctrls::TConsistentAttributes ConsistentAttributes = {read=GetConsistentAttributes, nodefault
		};
	__property AnsiString Name = {read=GetName, write=SetName};
	__property Graphics::TFontPitch Pitch = {read=GetPitch, write=SetPitch, nodefault};
	__property bool Protected = {read=GetProtected, write=SetProtected, nodefault};
	__property int Size = {read=GetSize, write=SetSize, nodefault};
	__property Graphics::TFontStyles Style = {read=GetStyle, write=SetStyle, nodefault};
	__property int Height = {read=GetHeight, write=SetHeight, nodefault};
public:
	#pragma option push -w-inl
	/* TPersistent.Destroy */ inline __fastcall virtual ~TTextAttributes(void) { }
	#pragma option pop
	
};


class DELPHICLASS TRichEdit2;
class PASCALIMPLEMENTATION TRichEdit2 : public TCustomRichEdit2 
{
	typedef TCustomRichEdit2 inherited;
	
__published:
	__property Align ;
	__property Alignment ;
	__property Anchors ;
	__property BiDiMode ;
	__property BorderStyle ;
	__property BorderWidth ;
	__property Color ;
	__property Ctl3D ;
	__property DragCursor ;
	__property DragKind ;
	__property DragMode ;
	__property Enabled ;
	__property Font ;
	__property HideSelection ;
	__property HideScrollBars ;
	__property ImeMode ;
	__property ImeName ;
	__property Constraints ;
	__property Lines ;
	__property MaxLength ;
	__property ParentBiDiMode ;
	__property ParentColor ;
	__property ParentCtl3D ;
	__property ParentFont ;
	__property ParentShowHint ;
	__property PlainText ;
	__property PopupMenu ;
	__property ReadOnly ;
	__property ScrollBars ;
	__property ShowHint ;
	__property TabOrder ;
	__property TabStop ;
	__property Visible ;
	__property WantTabs ;
	__property WantReturns ;
	__property WordWrap ;
	__property OnChange ;
	__property OnContextPopup ;
	__property OnDragDrop ;
	__property OnDragOver ;
	__property OnEndDock ;
	__property OnEndDrag ;
	__property OnEnter ;
	__property OnExit ;
	__property OnKeyDown ;
	__property OnKeyPress ;
	__property OnKeyUp ;
	__property OnMouseDown ;
	__property OnMouseMove ;
	__property OnMouseUp ;
	__property OnMouseWheel ;
	__property OnMouseWheelDown ;
	__property OnMouseWheelUp ;
	__property OnProtectChange ;
	__property OnResizeRequest ;
	__property OnSaveClipboard ;
	__property OnSelectionChange ;
	__property OnStartDock ;
	__property OnStartDrag ;
public:
	#pragma option push -w-inl
	/* TCustomRichEdit2.Create */ inline __fastcall virtual TRichEdit2(Classes::TComponent* AOwner) : TCustomRichEdit2(
		AOwner) { }
	#pragma option pop
	#pragma option push -w-inl
	/* TCustomRichEdit2.Destroy */ inline __fastcall virtual ~TRichEdit2(void) { }
	#pragma option pop
	
public:
	#pragma option push -w-inl
	/* TWinControl.CreateParented */ inline __fastcall TRichEdit2(HWND ParentWindow) : TCustomRichEdit2(
		ParentWindow) { }
	#pragma option pop
	
};


//-- var, const, procedure ---------------------------------------------------
#define taJustify (Classes::TAlignment)(3)

}	/* namespace Richedit2 */
#if !defined(NO_IMPLICIT_NAMESPACE_USE)
using namespace Richedit2;
#endif
#pragma option pop	// -w-
#pragma option pop	// -Vx

#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif	// Richedit2
